/*
 * @Author: Aaron Huang
 * @Date: 2022-10-19 14:26:47
 * @LastEditors: Evan Liu
 * @LastEditTime: 2022-11-18 15:11:53
 * @Description: file content
 * @FilePath: \ias_ui\src\api\coi\CBEC\maintainProducts.js
 * @Company: 沃尔玛
 */

import request from '@/utils/request'
import { exportFile } from '@/api/exportFile'

const prefix1 = process.env.VUE_APP_BASE_API9 // sku
const url = {
  maintainList_CBEC_API: `${prefix1}/chg-sku/findCBECChgSkuInfoTaskPage`,
  maintainListExportFile_CBEC_API: `${prefix1}/chg-sku/excelCBECChgSkuInfoList`,
  initCBECSkuChannelInfoByChannel: `${prefix1}/chg-sku/initCBECSkuChannelInfoByChannel`,
  saveAndPushCBECSkuInfo: `${prefix1}/chg-sku/saveAndPushCBECSkuInfo`,
  rePush_CBEC_API: `${prefix1}/chg-sku/batchPushChgSku`,
  findCBECSkuChannelInfoByUpc: `${prefix1}/chg-sku/findCBECSkuChannelInfoByUpc`
}

export const maintainList_CBEC_API = (data) => {
  return request({
    method: 'post',
    url: url.maintainList_CBEC_API,
    data
  })
}

export const maintainListExportFile_CBEC_API = (data, name) => {
  return exportFile(url.maintainListExportFile_CBEC_API, data, name)
}

export const rePush_CBEC_API = (data) => {
  return request({
    method: 'post',
    url: url.rePush_CBEC_API,
    data
  })
}

export const initCBECSkuChannelInfoByChannel = (data) => {
  return request({
    method: 'post',
    url: url.initCBECSkuChannelInfoByChannel,
    data
  })
}
export const saveAndPushCBECSkuInfo = (data) => {
  return request({
    method: 'post',
    url: url.saveAndPushCBECSkuInfo,
    data
  })
}
export const findCBECSkuChannelInfoByUpc = (data) => {
  return request({
    method: 'post',
    url: url.findCBECSkuChannelInfoByUpc,
    data
  })
}
